package com.example.badminton.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.badminton.entity.Venue;
import com.example.badminton.mapper.VenueMapper;
import com.example.badminton.service.VenueService;
import org.springframework.stereotype.Service;

@Service
public class VenueServiceImpl extends ServiceImpl<VenueMapper, Venue> implements VenueService {
    
    @Override
    public Venue getVenueInfo() {
        QueryWrapper<Venue> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("status", 1); // 只查询正常营业的场馆
        queryWrapper.last("LIMIT 1");
        return getOne(queryWrapper);
    }
} 